//------------------------------------------------------------------------------
// <copyright file="IEnumerableExtension.cs" company="Damian Antonowicz">
//       copyright © 2010 Damian Antonowicz
// </copyright>
// <author>Damian Antonowicz</author>
// <email>poczta@damianantonowicz.pl</email>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;

namespace DAnton.Utilities.Extensions
{
    public static class IEnumerableExtension
    {
        public static void ForEach<T>(this IEnumerable<T> enumerable, Action<T> action)
        {
            if (action == null)
                throw new ArgumentNullException("action");

            foreach (var item in enumerable)
                action(item);
        }
    }
}
